from fastapi import APIRouter,Request

request_param = APIRouter()



@request_param.get("/items")
def get_item(request: Request):
    print("request.url",request.url)
    print("request.host",request.client.host)
    print("request.user-agent",request.headers.get("user-agent"))
    print("request.cookies",request.cookies)
    print("request.headers",request.headers)
 
    return {"item_id": request.url, "q": request.headers.get("user-agent")}




